package com.tcs.quartz;

import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 知道你故意
 * @author wangbo
 */
@Component(value="porxyPoolScheduler")
@Scope("singleton")
public class PorxyPoolScheduler {
	
	private final Logger logger = LoggerFactory.getLogger(PorxyPoolScheduler.class);
	
    SchedulerFactory sf = new StdSchedulerFactory();
	
	public Scheduler getScheduler() {
		Scheduler scheduler = null;
		try {
			scheduler = sf.getScheduler();
		} catch (SchedulerException e) {
			logger.error("" , e);
		}
		return scheduler;
	}

}
